<?php
/**
 * Date: 2024.8
 * Author: kahn
 * 获取应用配置信息
 */

use config\Response;
use service\app\VersionService;

class SysController extends Controller{
    /*
  * 检查版本
  */
    public function versionAction(){
        $version = $this->_getParam('version', 'string');
        $platform = $this->_getParam('platform', 'intval');


        $info = VersionService::versionInfo($version, $platform);
        if(!$info){
            $this->_response(Response::SYSTEM_ERROR);
        }else{
            $this->_response(Response::SUCCESS, $info);
        }
    }

}